<?php
use yii\helpers\Url;
?>
<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta charset="utf-8">
    <title>后台登录</title>
    <script type="text/javascript" src="js/jquery.min.js"></script>
    <script type="text/javascript">
        $(function(){
            resizeScreen();
        });

        $(window).resize(function(){
            resizeScreen();
        });

        function resizeScreen(){
            var contentHeight = $(document).height() - 100;
            var contentWidth = $(document).width() - 250;
            $("#menu").height(contentHeight);
            $("#content-right").css({height : contentHeight , width :contentWidth });
        }

    </script>
    <link rel="stylesheet" type="text/css" href="css/iframe.css"/>
</head>
<body>
<div id="content">
    <ul id="menu">
        <li><a href="#"><span class="icon icon-home"></span>首页</a></li>
        <li><a href="<?=Url::to(['site/index'])?>"><span class="icon icon-person"></span>个人中心</a></li>
        <li>
            <a href="#"><span class="icon icon-message"></span>前台设置</a>
        </li>
        <li>
            <a href="#"><span class="icon icon-start"></span>内容管理</a>
            <ul><?php  foreach ( $text_arr as $k =>$v): ?>
                <li><a href="<?=Url::to([$k])?>" target="main"><?php echo $v ?></a></li>

                <?php endforeach;?>
            </ul>
<!--            <ul><li><a href="--><?//=Url::to(['category/index'])?><!--" target="main">分类管理</a></li>-->
<!--                <li><a href="--><?//=Url::to(['post/index'])?><!--" target="main">文章管理</a></li>-->
<!--                <li><a href="--><?//=Url::to(['comment/index'])?><!--" target="main">文章评论</a></li>-->
<!--                <li><a href="--><?//=Url::to(['contact/index'])?><!--">意见管理</a></li>-->
<!--                <li><a href="--><?//=Url::to(['permission/index'])?><!--">权限管理</a></li>-->
<!--            </ul>-->
        </li>
        <?php
        if (Yii::$app->user->identity->getUsername() == \common\models\Adminuser::SpuerAD){

        ?>
        <li>
            <a href="#"><span class="icon icon-setting"></span>用户设置</a>
            <ul>
                <li><a href="<?=Url::to(['user/index'])?>" target="main">用户管理</a></li>
                <li><a href="<?=Url::to(['adminuser/index'])?>" target="main">管理员设置</a></li>

            </ul>
        </li>
            <?php
        }
        ?>

    </ul>

</div>
</body>
</html>

<!--<li><a href="#"><span class="icon icon-home"></span>首页</a></li>-->
<!--<li>-->
<!--    <a href="#"><span class="icon icon-start"></span>内容管理</a>-->
<!--    <ul>-->
<!--        <li>-->
<!--            --><?php // foreach ( $text_arr as $k =>$v):?>
<!--            <a href="--><?//=Url::to([$k])?><!--" target="main">--><?php //echo $v ?>
<!--                --><?php //endforeach;?>
<!--            </a>-->
<!--        </li>-->
<!---->
<!--    </ul>-->
<!--</li>-->